package com.whfc.openapi.api.fse.service.impl;

import com.alibaba.fastjson.JSON;
import com.whfc.common.constant.QueueConst;
import com.whfc.fse.dto.FseGantryDataDTO;
import com.whfc.openapi.api.fse.service.OpenApiFseGantryService;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Description 龙门吊开放接口
 * @Author hw
 * @Date 2021-10-08 11:47
 * @Version 1.0
 */
@Service
public class OpenApiFseGantryServiceImpl implements OpenApiFseGantryService {


    @Autowired
    private AmqpTemplate amqpTemplate;

    @Override
    public void dataAdd(FseGantryDataDTO param) {
        amqpTemplate.convertAndSend(QueueConst.FSE_GANTRY_CURRENT_DATA, JSON.toJSONString(param));
    }
}
